/*
 * @Author: Simon 1958058172@qq.com
 * @Date: 2025-08-08 11:18:14
 * @LastEditors: Simon 1958058172@qq.com
 * @LastEditTime: 2025-08-08 11:27:15
 * @FilePath: \java.1212\csdn\baozhuang\li06\work02.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package csdn.baozhuang.li06;

import java.util.Scanner;

public class work02 {
    public static void main(String[] args) {

        Scanner scanner=new Scanner(System.in);

        while (true) {
        System.out.print("用户名:");
        String strname=scanner.nextLine();
        System.out.print("请输入密码:");
        String strmas=scanner.nextLine();

        if(strname.equals("admin")&&strmas.equals("briup")){
            System.out.println("登录成功");break;
        }
        else System.out.println("登录失败，用户名或密码有误");
    }

    }
}
